﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WarningAndMonitingSystem.Controls
{
    public partial class UParamText : UserControl
    {
        public UParamText()
        {
            InitializeComponent();
            this.Size = new Size(180, 40);
        }

        private string prefixText = "频率";
        [Category("自定义属性")]
        [Description("内容标题")]
        public string PrefixText
        {
            get { return prefixText; }
            set
            {
                prefixText = value;
                prelb.Text = prefixText;
            }
        }


        private string unit = "Hz";
        [Category("自定义属性")]
        [Description("数据单元标识符")]
        public string Unit
        {
            get { return unit; }
            set
            {
                unit = value;
                vallb.Text = $"{tvalue} {unit}";
            }
        }

        private string tvalue = "0";
        [Category("自定义属性")]
        [Description("数值")]
        public string TValue
        {
            get { return tvalue; }
            set
            {
                tvalue = value;
                vallb.Text = $"{tvalue} {unit}";
            }
        }
    }
}
